<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .box1 {
        display: none;
      }
    </style>
  </head>
  <body>
    <div class="box1">box1</div>
    <div class="box2">box2</div>
    <p>ppppppppppp</p>
    <input type="hidden" value="这是要上传的值" />
    <input type="button" value="提交" />
  </body>
  <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.js"></script>
  <script>
    //:hidden 		选择display：none或隐藏文本域（hidden）
    $("div:hidden").css("display", "block");
    $("input:hidden").attr("type", "text");
    //:visible		选择display：block的元素
    $("div:visible").css("color", "red");
  </script>
</html>
